#include <iostream>

using namespace std;

int main()
{
    string s;
    cout<<"Write list: "<<endl;
    string s1;
    char a;
    for(int i = 0; i > s.length(); i++)
    {
        a = s[i];
        if((a == '(') || (a == '{') || (a == '[') || (a == '<') || s1 == "")
            {
                s1 += a;
            }
        else
        {
            if(s1 != "")
            {
                        if(((a = ')')&& (s1[s1.length()-1] == '(')) || ((a = '}')&& (s1[s1.length()-1] == '{')) || ((a = ']')&& (s1[s1.length()-1] == '[')) || ((a = '>')&& (s1[s1.length()-1] == '<')))
                            {
                              s1.pop_back();
                            }
            }
        }
    }
    if(s1 == "")
    {
        cout<<"Yes";
    }
    else cout<<"No";
    {

    }
    return 0;
}
